package com.example.drive.db

import androidx.room.Dao
import androidx.room.Query
import com.example.drive.bean.ResultBean
import com.example.drive.bean.ResultBean_tableName
import kotlinx.coroutines.flow.Flow

@Dao
abstract class ResultBeanDao : BaseDao<ResultBean>() {
    // 初始化表名
    override fun initTableName(): String = ResultBean_tableName

    /**
     * 查询所有,返回Flow.不能放到父类中,会报错
     */
    @Query("SELECT * FROM $ResultBean_tableName")
    abstract fun queryAllWithFlow(): Flow<List<ResultBean>>
}